export default {
    state: () => ({
        isLogin: false
    }),
    mutations: {
        Login(state, data) {
            state.isLogin = data
        }
    },
    actions: {
        async set_login({ commit, state }, data) {
            const res = await this.$axios.post("http://zhuyujun.cn:9630/api/login", data)
            if (res.data == "登录成功") {
                commit("Login", true)
            } else {
                commit("Login", false)
            }
        }
    }
}